package me.spring.cloud.common.components.validator.annotation;

import me.spring.cloud.common.components.validator.annotation.constraint.ObjectValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = ObjectValidator.class)
@Target({ ElementType.METHOD, ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
public @interface ObjectValid {
	String message() default "{It's a mast Field}";

	boolean needValid() default false;

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};
}
